package com.neutech.service.impl;
import com.neutech.mapper.VisitListMapper;
import com.neutech.service.VisitListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public  class VisitListServiceImpl implements VisitListService {
    @Autowired
    private VisitListMapper visitListMapper;
    @Override
    public List<Map<String, Object>> queryVisitList() {
        List<Map<String, Object>> list = visitListMapper.queryVisitListList(0);
        return list;
    }
    @Override
    public void insertVisitList(Map map){
        Integer a = visitListMapper.addVisitList(map);

    }
    public void updataVisitList(Map map){
        visitListMapper.updataVisitListById(map);
    }
    @Override
    public void deleteVisitList(Map map){
        // visitListMapper.delVisitListById(map);
//        System.out.println(map.get("docid"));
//        System.out.println("kanzheli");
        Integer docid= Integer.valueOf(map.get("patid").toString());
        visitListMapper.delVisitListById(docid);
    }
}
